
SRCS += $(wildcard ./*.c)
OBJS = $(patsubst %.c,./obj/%.o,$(notdir $(SRCS)))

CC := gcc

TARGET := test

$(TARGET): ${OBJS} 
	$(CC) ${OBJS} -o ${TARGET} -lpthread -ldl
    
obj/%.o:./%.c
	$(CC) -fPIC -c $< -o $@

.PHYONY: clean
clean:
	rm -rf ${OBJS} 
	rm -rf ${TARGET} 
